<?php
/**
 * Created by PhpStorm.
 * User: kkw
 * Date: 2019/1/27
 * Time: 17:41
 */
namespace kkw\wantbuy\table;

use suda\archive\Table;

class WantBuyTable extends  Table
{
    public function __construct()
    {
        parent::__construct('want_buy_table');
    }

    protected function onBuildCreator($table)
    {
        return $table->fields(
            [
                $table->field('id', 'bigint', 20)->primary()->unsigned()->auto(),
                $table->field('title', 'varchar', 255)->default(null)->comment("标题"),
                $table->field('describe', 'text')->default(null)->comment("描述"),
                $table->field('price', 'varchar', 60)->default(null)->comment("价格"),
                $table->field('qq', 'varchar', 60)->default(null)->comment("qq"),
                $table->field('mobile', 'varchar', 60)->default(null)->comment("联系电话"),
                $table->field('wechat', 'varchar', 60)->default(null)->comment("微信号"),
                $table->field('time', 'int', 11)->comment("发布时间"),
                $table->field('address', 'varchar', 60)->default(null)->comment("发布地点"),
            ]);
    }
}